<div>
	<form method="post" id="value_${action_id}" name="value_${action_id}" enctype="multipart/form-data">
		<input type="hidden" id="entity.productSpecifications.id" name="valueDto.productSpecifications.id" value="${id?default('')}">
		<table class="form-table" cellpadding=3>
	    	<tr>
	            <td>${action.getDatagridTitle('productSpecificationsName')}:</td>
	            <td><input id="valueDto.productSpecifications.name" name="valueDto.productSpecifications.name" readonly="readonly" type="text" style="width: 300px;" class="easyui-validatebox"  /></td>
	        </tr>
	        <tr>
	            <td colspan="3">
	            	<a href="javascript:;;" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'" onClick="add_tr_${action_id}()" >添加规格值</a>
	            </td>
	        </tr>
	    </table>
	    <table class="form-table" cellpadding=3 id="value_table_${action_id}">
	    	<thead>
	    		<tr style="height:30px;">
		    		<td style="width: 300px;">${action.getDatagridTitle('value')}</td>
		            <td style="text-align:center;">${action.getDatagridTitle('caozuo')}</td>
		        </tr>
	    	</thead>
	    </table>
	</form>
</div>
<script type="text/javascript">
	var num_${action_id} = 0;
	$(function() {
		getProductSpecificationsValueList_${action_id}();
	});
	function getProductSpecificationsValueList_${action_id}(){
		$.ajax({
				url : '${request.contextPath}${namespace?default('')}/mp/product/specifications-getValueList.json',
				data : {
					id : '${id}'
				},
				dataType : 'JSON',
				success : function(json) {
					$("#value_${action_id}").find("[name='valueDto.productSpecifications.name']").val(json.productSpecifications.name);
					if(json.list){
						var ss = "";
						for(var i=0;i<json.list.length;i++){
							ss += '<tr id="value_table_tr_'+num_${action_id}+'_${action_id}">' + 
									 	'<td>' + 
									 		'<input name="valueDto.list['+num_${action_id}+'].id" type="hidden" style="width: 300px;" value="'+json.list[i].id+'"/>' +
									 		'<input name="valueDto.list['+num_${action_id}+'].value" type="text" style="width: 300px;" value="'+json.list[i].value+'" class="easyui-validatebox" data-options="validType:\'length[0,64]\'"   />' +
									 	 '</td>' +
									 	 '<td style="text-align:center;">' +
							    		     '<a href="javascript:;;" class="easyui-linkbutton" data-options="plain:true,iconCls:\'icon-remove\'" onClick="remove_tr_${action_id}('+num_${action_id}+')">删除</a> '+
							    	     '</td>' +
									  '</tr>';
							num_${action_id} = num_${action_id} + 1;
						}
						$("#value_table_${action_id}").append(ss);
						$.parser.parse('#value_table_${action_id}');
					}
				}
			});
	}
	
	function add_tr_${action_id}(){
		var ss = '<tr id="value_table_tr_'+num_${action_id}+'_${action_id}">' + 
				 	'<td>' + 
				 		'<input name="valueDto.list['+num_${action_id}+'].value" type="text" style="width: 300px;" class="easyui-validatebox" data-options="validType:\'length[0,64]\'"   />' +
				 	 '</td>' +
				 	 '<td style="text-align:center;">' +
		    		     '<a href="javascript:;;" class="easyui-linkbutton" data-options="plain:true,iconCls:\'icon-remove\'" onClick="remove_tr_${action_id}('+num_${action_id}+')">删除</a> '+
		    	     '</td>' +
				  '</tr>';
		$("#value_table_${action_id}").append(ss);
		$.parser.parse('#value_table_${action_id}');
		num_${action_id} = num_${action_id} + 1;
	}
	
	function remove_tr_${action_id}(num){
		$("#value_table_tr_"+num+"_${action_id}").remove();
	}
</script>